package org.gap.wizards.creature;

import org.gap.wizards.creature.Creature.Attribute;
import org.gap.wizards.effects.Effect;
import org.gap.wizards.items.Item;
import org.gap.wizards.pc.skills.BasicSkill;
import org.gap.wizards.utils.Dice;
import org.gap.wizards.utils.SkillRollDice;
import org.gap.wizards.views.ViewPlatform.Color;

public class AnimalFactory {
	
	public static Animal createCat(Brain brain) {
		brain.setSkittish(true);
		Animal animal = new Animal(brain, Description.KITTEN, new MeleeAttack("Claw", Dice.D2));
		animal.addSkill(new BasicSkill("Claw", 16, new SkillRollDice()));
		setAttributesOnAnimal(animal, 3, 6, 4);
		return animal;
	}

	public static Creature createDog(Brain brain) {
		brain.setAggressive(true);
		Animal animal = new Animal(brain, Description.DOG, new MeleeAttack("Bite", Dice.D4));
		animal.addSkill(new BasicSkill("Bite", 14, new SkillRollDice()));
		setAttributesOnAnimal(animal, 6, 5, 6);
		return animal;
	}

	private static void setAttributesOnAnimal(Animal animal, int str, int iq, int hp) {
		animal.initAttribute(Attribute.Strength, str, str);
		animal.initAttribute(Attribute.Intelligence, iq, iq);
		animal.initAttribute(Attribute.Hitpoints, hp, hp);
	}

	public static Item createCorpse() {
		Item item = new Item(Effect.NONE, new org.gap.wizards.items.Description("Corpse", '%', Color.GRAY) );
		return item;
	}
}
